package com.sinosoft.weixin.config;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * Created by huzhengying on 2017/12/6.
 */
@Configuration
public class InterfaceAdapterConfig {
    @Value("${gcas.addr}")
    public String addr;

    public String getContextUrl(String func) {
        if(StringUtils.isNotBlank(addr)) {
            if (addr.endsWith("/")) {
                return addr + func;
            } else {
                return addr + "/" + func;
            }
        }
        return addr+func;
    }

    public static final String LOGIN = "login";
    public static final String QUERY = "query";
    public static final String MINUTE = "minute";
    public static final String CALPREM = "calPrem";
    public static final String SUBMITE = "submit";
    public static final String CLAIMRATE = "claimRate";
    public static final String DELETERISK = "deleteRisk";
    public static final String QUERYPDF = "queryPDF";

}
